package net.cookiefarmers.seedswap



class LoginTagLib {
  def loginControl = {
    if(session.user){
      out << "<span style='color:green'>Hello ${session.user.name}&nbsp;&nbsp;&nbsp;"
      out << """[${link(action:"logout", controller:"user"){"Logout"}}]"""
    } else {
      out << """${link(action:"login", controller:"user"){"Login"}}"""      
    }
	out<< "</span>";
  }
}
